package population.phaseExecutors;

import population.Population;
import utilities.WorldState;

/**
 * Age characters in population.
 * @author pcdejager
 */
public class AgePhase implements PhaseExecutor {
    /**
     * Constructor.
     * @param numberOfDays Days to age by
     */
    public AgePhase(final int numberOfDays) {
        days = numberOfDays;
    }

    /**
     * Execute.
     * @param p Population to run on
     */
    public final void execute(final Population p) {
        for (int count = 0; count < days; ++count) {
            WorldState.getState().nextDay();
        }
    }

    /**
     * Number of days to age by.
     */
    private int days = 0;
}
